package com.demo.swingquickticket.entity;

import lombok.Data;

@Data
public class JsonResult<T> {

    public static final String SUCCESS_CODE = "1";

    public static final String ERROR_CODE = "2";

    private String code;

    private String message;

    private T Data;

    public JsonResult(String message) {
        this.code = SUCCESS_CODE;
        this.message = message;
    }

    public JsonResult(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public JsonResult(String code, String message, T data) {
        this.code = code;
        this.message = message;
        Data = data;
    }
}
